Skip to contentSkip to conversation

Accidental removal of logical volume - any way to salvage?

linux-lvm Martin Lindquist 2 participants 5 messages Feb 5, 2006 – Feb 6, 2006

lore
Share & tools
lore
#0 lore raw

Ok, here's the situation:

I have a volume group consisting of two whole disk partitions, on top of which I used to have a full size logical volume containing data of system non-critical but nevertheless important nature. After deciding to replace a lot of the hardware in the machine (and to reinstall the system) I realized that I would first need to export the volume group or I could be in for a lot of trouble (lesson learned from previous experience). To make a long and stupid story (for which I have no defense) a lot shorter; I did 'lvremove main' ("main" being the name of the lv in question), ran 'vgexport rajd' ("rajd" being the vg), backed up a lot of files (including /etc and most of /var), replaced the hardware, reinstalled the system, ran 'vgimport rajd' and only then realized what 'lvremove' really did.

Now, instead of getting questions like "what did you think 'lvremove main' would do?" or "are you the result of several generations of inbreeding?", could anyone first of all tell me if there is any way at all to salvage the data from the logical volume "main"? If there is I would love to find out how.

Regards,
Martin

#1 lore raw
Quoted 2 lines · Martin Lindquist

could anyone first of all tell me if there is any way at all to salvage the data from the logical volume "main"?

man vgcfgrestore if you retained metadata backups from /etc from before you deleted the LV.

Failing that, if you're using LVM2 you might still be able to salvage the metadata from the from the front of the disk.

Alasdair

Signature · 1 line
[email protected]
#2 lore raw

First of all, thank you for a fast response.

The backup of /etc was done after running 'lvremove' and 'vgexport' so if I understand you correctly that won't do any good.

Yes, I am using LVM2. How do I salvage the metadata "from the front of the disk?"

Regards,
Martin

2006/2/5, Alasdair G Kergon <[email protected]>:

Quoted 16 lines · Martin Lindquist
Quoted 1 line

could anyone first of all tell me if there is any way at all to salvage

the

Quoted 1 line

data from the logical volume "main"?

man vgcfgrestore if you retained metadata backups from /etc from before you deleted the LV.

Failing that, if you're using LVM2 you might still be able to salvage the metadata from the from the front of the disk.

Alasdair
--
[email protected]

Quoted 6 lines

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

--
Martin Lindquist
IRC: nms @ irc.freenode.net, irc.vapor.com and irc.gimp.org
E-mail: [email protected]
ICQ: 10386446
Skype: bilgalning
GSM: +46-(0)73-505 29 97
WoW: Vhasiu @ Ravencrest (EU)

#3 lore raw
Quoted 2 lines · Martin Lindquist

The backup of /etc was done after running 'lvremove' and 'vgexport' so if I understand you correctly that won't do any good.

Take a look at your backup and check the comments in the files in /etc/lvm/archive/<vgname>*

Alasdair

Signature · 1 line
[email protected]
#4 lore raw

Many, many, many thanks. After sleeping for a few hours and eating a proper breakfast I managed to restore all of the lost data thanks to your hints.

Eternally thankful,
Martin

2006/2/5, Alasdair G Kergon <[email protected]>:

Quoted 19 lines · Martin Lindquist
Quoted 1 line

The backup of /etc was done after running 'lvremove' and 'vgexport' so

if I

Quoted 1 line

understand you correctly that won't do any good.

Take a look at your backup and check the comments in the files in /etc/lvm/archive/<vgname>*

Alasdair
--
[email protected]

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/